import request from '@/router/axios';
const urlPrefix = '/admin';

export function list(data) {
    return request.post(urlPrefix + '/goods_theme/list', data);
}
export function create(data) {
    return request.post(urlPrefix + '/goods_theme/add', data);
}
export function update(data) {
    return request.post(urlPrefix + '/goods_theme/modify', data);
}
export function removeById(id) {
    return request.post(urlPrefix + '/goods_theme/delete', {
        id
    });
}

export function themeGoodsList({ id, pageNo, pageSize, title}) {
    return request.post(urlPrefix + '/goods_theme/goods/list_relation', {
        id, pageNo, pageSize,title
    });
}

export function themeNoGoodsList({ id, pageNo, pageSize,title }) {
    return request.post(urlPrefix + '/goods_theme/goods/list_not_relation', {
        id, pageNo, pageSize,title
    });
}

export function themeAddGoods({ id, goodsId }) {
    return request.post(urlPrefix + '/goods_theme/goods/add_relation', { id, goodsId })
}

export function themeDeleteGoods({ id, goodsId }) {
    return request.post(urlPrefix + '/goods_theme/goods/delete_relation', { id, goodsId });
}
export function recommendNorelation(data){
    return request.post(urlPrefix + '/goods_recommend/goods/list_not_relation', data);
}